package com.zzy.transaction.aop;

import org.springframework.aop.Pointcut;
import org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor;

public class TransactionPointcutAdvisor extends AbstractBeanFactoryPointcutAdvisor {

    private final CustomTransactionAttributeSource transactionAttributeSource;

    private final Pointcut pointCut;

    public TransactionPointcutAdvisor(CustomTransactionAttributeSource transactionAttributeSource) {
        this.transactionAttributeSource = transactionAttributeSource;
        pointCut = new TransactionPointCut(this.transactionAttributeSource);
    }

    @Override
    public Pointcut getPointcut() {
        return this.pointCut;
    }
}
